<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
<title>Todos Los Estudiantes</title>
</head>
<body>
	<h1>Todos Los Estudiantes</h1>
	<table style="width: 100%">
		<tr>
			<td><a href="students/add.html">Agregar Alumnos</a></td>
			<td><a href="students/updateLoad.html">Modificar Alumnos</a></td>
			<td><a href="students/deleteLoad.html">Eliminar Alumnos</a></td>
		</tr>
	</table>
	<c:if test="${!empty students}">
		<table border="1" style="text-align: center; margin: 0 auto;">
			<tr>
				<td align="center" valign="middle">Student ID</td>
				<td align="center" valign="middle">Student Name</td>
				<td align="center" valign="middle">Student Address</td>
			</tr>

			<c:forEach items="${students}" var="student">
				<tr>
					<td align="center" valign="middle"><c:out
							value="${student.studentId}" /></td>
					<td align="center" valign="middle"><c:out
							value="${student.studentName}" /></td>
					<td align="center" valign="middle"><c:out
							value="${student.adress.street}" /></td>
					<td align="center" valign="middle">

						<form action="students/updateLoad.html" method="post">
							<input type="hidden" name="studentId"
								value="${student.studentId}"> <input type="submit"
								value="modificar">
						</form>
					</td>
				</tr>
				<tr>
					<td></td>
				</tr>
			</c:forEach>
		</table>
	</c:if>
	<form action="students/add.html">
		<table style="text-align: center; margin: 0 auto;">
			<tr align="center" valign="middle">
				<td align="center" valign="middle"><input type="submit"
					value="Agregar Estudiante"></td>
			</tr>
		</table>
	</form>
</body>
</html>